package com.kk.bootstartdoris.service;

import com.kk.bootstartdoris.bean.Dictdata;
import org.nutz.dao.Dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TestService {

    @Autowired
    Dao dao;

    @Autowired
    JdbcTemplate jdbcTemplate;
    @Autowired
    @Qualifier("jdbcTemplate2")
    JdbcTemplate jdbcTemplate2;

    public String sayHello() {
        List<Map<String, Object>> maps1 = jdbcTemplate2.queryForList ("select  * from tbl_user_sync ");

        Dictdata fetch = dao.fetch (Dictdata.class, 1L);
        List<Map<String, Object>> maps = jdbcTemplate.queryForList ("select * from system_dict_data");
        return fetch.getLable ();
    }
}
